import request from '@/utils/axios';

import { ExcelImportListRS } from './types';

export const listApi = (params: any) => {
  return request.post<ExcelImportListRS>({
    url: '/system/excelImport/list',
    params,
  });
};

export const removeApi = (id?: string) => {
  return request.post({ url: '/system/excelImport/remove', params: { id } });
};

export const removeFileApi = (tempFileId?: string) => {
  return request.post({
    url: '/system/excelImport/removeFile',
    params: { tempFileId },
  });
};

export const getUnfinishedCountApi = () => {
  return request.get<number>({ url: '/system/excelImport/getUnfinishedCount' });
};
